package org.megha.blog.example.part5;

/** A class that represents a circle */
public class Circle implements Shape {

	double radius;

	public Circle(double radius) {
		this.radius = radius;
	}

	public double area() {
		return Math.PI* radius*radius;
	}

	public double perimeter() {
		return 2*Math.PI*radius;
	}

	@Override
	public String toString() {
		return "circle of radius " + radius;
	}
}
